local skill = fk.CreateSkill{
    name = "#jinhs__xiongzhi_active",
}

skill:addEffect("viewas",{
    anim_type = "special",
    pattern = ".",
    expand_pile = function(self, player)
      local n = player.maxHp
      local ids = {}
      for i = 1, n, 1 do
        if i > #Fk:currentRoom().draw_pile then break end
        table.insert(ids, Fk:currentRoom().draw_pile[i])
      end
      return ids
    end,
    card_filter = function(self, player, to_select, selected)
      if #selected == 0 and table.contains(Fk:currentRoom().draw_pile, to_select) then
        local card = Fk:getCardById(to_select)
        return player:canUse(card,{ bypass_distances = true, bypass_times = true }) and not player:prohibitUse(card)
      end
    end,
    view_as = function(self, player, cards)
      if #cards ~= 1 then return end
      local card = Fk:getCardById(cards[1])
      card.skillName = "jinhs__xiongzhi"
      return card
    end,
})

return skill